package domino;

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.datatransfer.*;
import java.awt.dnd.*;

class DragPanel {

    private JPanel panel;

    public DragPanel(JPanel p) {
        panel = p;
        panel.addMouseListener(new EventMouseListener());
        panel.addMouseMotionListener(new EventMouseMotionListener());
    }

    class EventMouseListener extends MouseAdapter {

        public void mousePressed(MouseEvent event) {
            int a = 1;
        }

        public void mouseRelease(MouseEvent event) {
            int a = 1;
        }

        public void mouseClicked(MouseEvent event) {
            int a = 1;
        }
    }

    class EventMouseMotionListener extends MouseMotionAdapter {

        public void mouseDragged(MouseEvent event) {
            int a = 1;
        }

        public void mouseMoved(MouseEvent event) {
            int a = 1;
        }
    }
}
